package com.example.checkqufuface.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

public class JJHFindShipListResultBean implements Parcelable {


    /**
     * code : 200
     * message : 获取航线班次(金鸡湖)成功
     * data : [{"shiftsId":10000000035020,"leaveTimeType":1,"leaveTime":"17:38","shiftsName":"11","shiftsCapacity":999,"usedCapacity":0,"residueCapacity":999,"stopSellTime":1},{"shiftsId":10000000035038,"leaveTimeType":1,"leaveTime":"19:39","shiftsName":"222","shiftsCapacity":999,"usedCapacity":0,"residueCapacity":999,"stopSellTime":1}]
     */

    private String code;
    private String message;
    private List<DataBean> data;

    protected JJHFindShipListResultBean(Parcel in) {
        code = in.readString();
        message = in.readString();
    }

    public static final Creator<JJHFindShipListResultBean> CREATOR = new Creator<JJHFindShipListResultBean>() {
        @Override
        public JJHFindShipListResultBean createFromParcel(Parcel in) {
            return new JJHFindShipListResultBean(in);
        }

        @Override
        public JJHFindShipListResultBean[] newArray(int size) {
            return new JJHFindShipListResultBean[size];
        }
    };

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(code);
        dest.writeString(message);
    }

    public static class DataBean implements Parcelable {
        /**
         * shiftsId : 10000000035020
         * leaveTimeType : 1
         * leaveTime : 17:38
         * shiftsName : 11
         * shiftsCapacity : 999
         * usedCapacity : 0
         * residueCapacity : 999
         * stopSellTime : 1
         */

        private long shiftsId;
        private int leaveTimeType;
        private String leaveTime;
        private String shiftsName;
        private int shiftsCapacity;
        private int usedCapacity;
        private int residueCapacity;
        private int stopSellTime;

        protected DataBean(Parcel in) {
            shiftsId = in.readLong();
            leaveTimeType = in.readInt();
            leaveTime = in.readString();
            shiftsName = in.readString();
            shiftsCapacity = in.readInt();
            usedCapacity = in.readInt();
            residueCapacity = in.readInt();
            stopSellTime = in.readInt();
        }

        public static final Creator<DataBean> CREATOR = new Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel in) {
                return new DataBean(in);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };

        public long getShiftsId() {
            return shiftsId;
        }

        public void setShiftsId(long shiftsId) {
            this.shiftsId = shiftsId;
        }

        public int getLeaveTimeType() {
            return leaveTimeType;
        }

        public void setLeaveTimeType(int leaveTimeType) {
            this.leaveTimeType = leaveTimeType;
        }

        public String getLeaveTime() {
            return leaveTime;
        }

        public void setLeaveTime(String leaveTime) {
            this.leaveTime = leaveTime;
        }

        public String getShiftsName() {
            return shiftsName;
        }

        public void setShiftsName(String shiftsName) {
            this.shiftsName = shiftsName;
        }

        public int getShiftsCapacity() {
            return shiftsCapacity;
        }

        public void setShiftsCapacity(int shiftsCapacity) {
            this.shiftsCapacity = shiftsCapacity;
        }

        public int getUsedCapacity() {
            return usedCapacity;
        }

        public void setUsedCapacity(int usedCapacity) {
            this.usedCapacity = usedCapacity;
        }

        public int getResidueCapacity() {
            return residueCapacity;
        }

        public void setResidueCapacity(int residueCapacity) {
            this.residueCapacity = residueCapacity;
        }

        public int getStopSellTime() {
            return stopSellTime;
        }

        public void setStopSellTime(int stopSellTime) {
            this.stopSellTime = stopSellTime;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeLong(shiftsId);
            dest.writeInt(leaveTimeType);
            dest.writeString(leaveTime);
            dest.writeString(shiftsName);
            dest.writeInt(shiftsCapacity);
            dest.writeInt(usedCapacity);
            dest.writeInt(residueCapacity);
            dest.writeInt(stopSellTime);
        }
    }
}
